#include <iostream>
using namespace std;

class Complex {
		double real;
		double img;
	public:
		Complex(double r = 0.0, double i = 0.0): real(r), img(i) {};
		Complex operator+(int r) {
			return Complex(real + r, img);
		}
		friend Complex operator+(int r, const Complex &o) {
			return Complex(r + o.real, o.img);
		}
		void display()const {
			cout << "(" << real << "," << img << ")" << endl;
		}
};

int main() {

	Complex c1(1, 0);
	c1 = c1 + 5;
	c1.display();
	Complex c2(2, 3);
	c2 = c2 + 4;
	c2.display();
	return 0;
}